
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>DNS优化和高可用设计 - 学习卡片</title>
      <style>
        body { font-family: sans-serif; background-color: #f0f8ff; color: #333; display: flex; flex-direction: column; align-items: center; padding: 50px 20px; }
        .header h1 { font-size: 32px; }
        .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; width: 100%; max-width: 1200px; }
        .card-container { perspective: 1200px; cursor: pointer; height: 250px; }
        .card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.7s; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
        .card-container.flipped .card { transform: rotateY(180deg); }
        .card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 16px; background-color: #fff; padding: 24px; }
        .card-back { background-color: #f0fff4; transform: rotateY(180deg); justify-content: space-between; }
        .card-category { font-size: 14px; color: #0052d9; margin-bottom: 8px; font-weight: 500; }
        .card-question { font-size: 20px; font-weight: 500; flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
        .card-answer-wrapper { flex-grow: 1; overflow-y: auto; }
        .card-answer { font-size: 15px; line-height: 1.7; }
        .card-footer { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 16px; margin-top: 16px; }
        .card-source { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: 12px; }
      </style>
    </head>
    <body>
      <div class="header">
        <h1>DNS优化和高可用设计 - 学习卡片</h1>
      </div>
      <div class="grid-container">
        
    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">为了减少DNS查询开销，文档中提到了哪三个层级的缓存机制？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">文档中提到了三个层级的缓存：1. 本地缓存（客户端操作系统缓存）；2. 浏览器缓存（现代浏览器对常用域名进行缓存）；3. ISP 缓存（ISP的DNS服务器缓存大量解析结果）。</div>
          </div>
          <div class="card-source">来源: 1.1 DNS 缓存机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">在配置DNS缓存时，TTL（生存时间）值的长短分别对系统有什么影响？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">短TTL可以保证域名变更的快速响应，但可能会增加DNS服务器的负载；长TTL可以减少查询次数，但会降低域名记录的更新速度。</div>
          </div>
          <div class="card-source">来源: 1.1 DNS 缓存机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">文档中提到的Anycast技术是如何用于优化分布式DNS解析的？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">Anycast技术通过将同一个IP地址部署在不同的地理位置，能自动将用户的DNS请求路由到最近的可用节点，从而降低网络延迟并提高服务可用性。</div>
          </div>
          <div class="card-source">来源: 1.2 分布式解析</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">模式</div>
          <div class="card-question">在DNS的主备架构中，主服务器和从服务器各自扮演什么角色？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">模式</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">主服务器（Primary Server）负责存储和管理域名记录。从服务器（Secondary Server）则定期从主服务器同步数据，并在主服务器不可用时自动接管解析任务，以实现高可用。</div>
          </div>
          <div class="card-source">来源: 2.1 主备架构</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">为实现DNS服务的高可用，系统如何进行故障检测与自动切换？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">系统通过实时监控DNS服务器的健康状态，并使用自动化工具（如健康检查服务）来快速检测节点故障，然后自动将流量切换到备用节点。</div>
          </div>
          <div class="card-source">来源: 2.3 故障检测与切换</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">安全</div>
          <div class="card-question">什么是DNSSEC？它主要用于防范哪种类型的网络攻击？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">安全</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">DNSSEC（DNS安全扩展）是一种通过公钥验证来确保DNS响应未被篡改的技术。它主要用于防范缓存投毒（Cache Poisoning）攻击。</div>
          </div>
          <div class="card-source">来源: 3.1 防御DNS攻击</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">DoH (DNS over HTTPS) 和 DoT (DNS over TLS) 解决了什么安全和隐私问题？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">DoH和DoT通过加密DNS请求，可以有效防止网络流量被中间人窃听和篡改，从而保护用户的查询隐私和数据完整性。</div>
          </div>
          <div class="card-source">来源: 3.2 隐私保护</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">文档是如何描述利用容器化技术（如Kubernetes）来提升DNS服务扩展性的？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">通过使用Kubernetes等容器化技术部署DNS服务，可以实现服务的自动扩缩容，从而能够动态地增加DNS节点以应对高流量场景。</div>
          </div>
          <div class="card-source">来源: 4.1 动态扩展能力</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">工具</div>
          <div class="card-question">在性能监控方面，文档推荐了哪些工具组合来监控DNS服务？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">工具</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">文档推荐使用Prometheus结合Grafana来展示DNS性能指标（如延迟、成功率），以及使用Zabbix或Nagios等专用工具进行服务健康检查。</div>
          </div>
          <div class="card-source">来源: 5.1 性能监控</div>
        </div>
      </div>
    </div>

      </div>
    </body>
    </html>
